package fudan.se.lab2.controller;

import fudan.se.lab2.domain.Meeting;
import fudan.se.lab2.service.WheelChairUtilService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class WheelChairUtilController {
    private final WheelChairUtilService wheelChairUtilService;

    @Autowired
    public WheelChairUtilController(WheelChairUtilService wheelChairUtilService) {
        this.wheelChairUtilService = wheelChairUtilService;
    }

    @PostMapping("/allMeetings")
    public ResponseEntity<List<Meeting>> allMeetings() {
        return ResponseEntity.ok(wheelChairUtilService.allMeetings());
    }
}
